package org.fuyd.designpattern;


import java.lang.reflect.Proxy;

/**
 * Created by Jason on 2015/10/24.
 */
public class ProxyTest {


    public static void main(String[] args) {

        MyInterface myInterface=(MyInterface) Proxy.newProxyInstance(ProxyTest.class.getClassLoader(), new Class[]{MyInterface.class}, new MyProxoyHandler(new MyInterfaceImpl()));

        myInterface.hello("xxx");
    }
}
